package com.zl.gmadmin.controller;

import com.zl.gmadmin.common.ApiResponse;
import com.zl.gmadmin.service.BlogArticleTypeService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: ZhangLiang
 * @Date: 2021/08/25/9:54
 * @Description:
 */
@Api(value = "博客文章类型管理")
@RestController
@RequestMapping("/api/blog/type")
public class BlogArticleTypeController {

    private final BlogArticleTypeService blogArticleTypeService;

    public BlogArticleTypeController(BlogArticleTypeService blogArticleTypeService) {
        this.blogArticleTypeService = blogArticleTypeService;
    }

    @GetMapping("getAll")
    public ApiResponse getAll(){
        return ApiResponse.ofSuccess(blogArticleTypeService.list());
    }
}
